﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Web;

namespace JquyerCitySelectDemo
{
	/// <summary>
	/// GetArea 的摘要说明
	/// </summary>
	public class GetArea : IHttpHandler
	{

		public void ProcessRequest(HttpContext context)
		{
			context.Response.ContentType = "text/plain";
			string id = context.Request["id"];
			Debug.Write(string.Format("此处id[{0}]为ajax提交发送过来的被选中的省市区对应的id", id));
			//此处模拟数据，使用时请自行根据ajax传递的id
			context.Response.Write(
				"[{\"ID\":1,\"Name\":\"北京\",},{\"ID\":2,\"Name\":\"天津\",},{\"ID\":3,\"Name\":\"河北省\",},{\"ID\":4,\"Name\":\"山西省\",},{\"ID\":5,\"Name\":\"内蒙古\",},{\"ID\":6,\"Name\":\"辽宁省\",},{\"ID\":7,\"Name\":\"吉林省\",},{\"ID\":8,\"Name\":\"黑龙江\",}]");

		}



		public bool IsReusable
		{
			get
			{
				return false;
			}
		}
	}
}